package com.qqtech.qquan.user.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qqtech.core.frame.model.Result;
import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.user.model.UserSysDict;
import com.qqtech.qquan.user.model.UserSysDictQuery;
import com.qqtech.qquan.user.model.UserSysDictVo;
import com.qqtech.qquan.user.service.UserSysDictService;
import com.qqtech.web.context.BaseWebController;

@Controller
@RequestMapping(value = "/user/sys/dict")
public class UserSysDictController extends BaseWebController<UserSysDict, UserSysDictQuery> {
	@Resource
	private UserSysDictService userSysDictService;

	@Override
	protected BaseService<UserSysDict> getBaseService() {
		return userSysDictService;
	}
	
	@RequestMapping(value = "/list")
	@ResponseBody
	public Result list(@RequestBody UserSysDictQuery userSysDictQuery) {
		Result result = new Result();
		List<UserSysDictVo> list=userSysDictService.queryList(userSysDictQuery);
		result.put("list", list);
		return result;
	}
}
